package cn.com.infcn.spider.domain;

import cn.com.infcn.spider.scheduler.Scheduler;
import cn.com.infcn.spider.scheduler.ftp.FtpScheduler;

public class FtpJob extends Job {

	private String jobType = "ftp";
	
	private String regexFilter; // url爬取规则

	private int threadNum = 1;

	private boolean saveHtml;
	
	private int depth; // 采集深度
	
	private int errCount;
	
	private int timeout = 3000;
	
	public String getRegexFilter() {
		return regexFilter;
	}

	public void setRegexFilter(String regexFilter) {
		this.regexFilter = regexFilter;
	}

	public boolean isSaveHtml() {
		return saveHtml;
	}

	public void setSaveHtml(boolean saveHtml) {
		this.saveHtml = saveHtml;
	}

	public String getJobType() {
		return jobType;
	}
	
	public int getThreadNum() {
		return threadNum;
	}

	public void setThreadNum(int threadNum) {
		if(threadNum<=0){
			threadNum = 1 ;
		}
		this.threadNum = threadNum;
	}

	@Override
	public Scheduler instanceScheduler() {
		return new FtpScheduler(this);
	}

	public int getDepth() {
		return depth;
	}

	public void setDepth(int depth) {
		this.depth = depth;
	}

	public int getErrCount() {
		return errCount;
	}

	public void setErrCount(int errCount) {
		this.errCount = errCount;
	}

	public int getTimeout() {
		return timeout;
	}

	public void setTimeout(int timeout) {
		this.timeout = timeout;
	}

}
